﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Skill.aspx.cs" Inherits="ResumeProvider.Model.Skill" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div id="content">
            <div id="skillDetail">
                 <asp:GridView ID="GridViewSkillSet" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
                    BorderWidth="1px" CellPadding="4"
                    DataSourceID="LinqDataSourceCandidate" ForeColor="Black" 
                     GridLines="Horizontal">
                    <Columns>
                        <asp:TemplateField HeaderText="candidateid" SortExpression="candidateid">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%#  (Eval("candidate.firstname") + " " + Eval("candidate.lastname"))  %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("candidateid") %>'></asp:Label>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="skillid" SortExpression="skillid">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("skillmaster.skillname") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("skillid") %>'></asp:Label>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="totalmonths" HeaderText="totalmonths" ReadOnly="True"
                            SortExpression="totalmonths" />
                        <asp:BoundField DataField="lastused" HeaderText="lastused" ReadOnly="True" 
                            SortExpression="lastused" DataFormatString="{0:M}" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F7F7F7" />
                    <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
                    <SortedDescendingCellStyle BackColor="#E5E5E5" />
                    <SortedDescendingHeaderStyle BackColor="#242121" />
                </asp:GridView>
            </div>
  
    </div>
            <asp:LinqDataSource ID="LinqDataSourceCandidate" runat="server" ContextTypeName="Web.CandidateSkillDataDataContext"
            EntityTypeName="" 
        
        Select="new (candidateid, skillid, totalmonths, lastused, skillmaster, candidate)" TableName="candidate_skills"
           
        Where="candidateid == @candidateid" EnableDelete="True" 
        EnableInsert="True" EnableUpdate="True">
                <WhereParameters>
                    <asp:QueryStringParameter DefaultValue="2" Name="candidateid" 
                        QueryStringField="candidateid" Type="Int64" />
                </WhereParameters>
        </asp:LinqDataSource>
    </form>
</body>
</html>
